package demo;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class ChouJiang{
	static ArrayList<Integer> list=new ArrayList<>();
	static{
		Collections.addAll(ChouJiang.list, 10,6,20,50,100,200,500,800,2,80,300,700);
	}
	public static synchronized int chouJiang(){
		Random r=new Random();
		int a=r.nextInt(list.size());
		int result=list.get(a);
		list.remove(a);
		return result;
	}
}
